import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
// 引入路由实例
import router from './router/index'
// 引入pinia 实例
import pinia from './pinia/index'


// 如果只想导入css变量
import 'element-plus/theme-chalk/dark/css-vars.css'

import '@/assets/style/base.scss'

import '@/assets/style/reset.scss'
import userStore from '@/pinia/userStore';  
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
  
// 创建 Pinia store 实例并调用 restoreState  
const myStore = userStore(pinia);  
myStore.restoreState(); 

app.use(pinia).use(router).mount('#app')
